Nasty Little Syntax Error

Hey All.
I've got one and only one syntax error...the kind where it gives
the line number as one past the end of the file.
I have a good editor, checked for matching parens, etc.
All looks good on that front.
Any ideas what else to look for? (Haven't done this in
a few years; I'm a little rusty.)
Thanks in advance.
Tara
tlwtheq - Fri May 06 07:43:36 EDT 2011

Re: Nasty Little Syntax Error
DXLNeed - Fri May 06 07:52:52 EDT 2011

Hi,

May be you can check for the paranthesis and double coder (") are proper in the files included also. Mostly this should solve the problem.

Regards,
Ashish

Re: Nasty Little Syntax Error
tlwtheq - Fri May 06 08:08:09 EDT 2011

DXLNeed - Fri May 06 07:52:52 EDT 2011
Hi,

May be you can check for the paranthesis and double coder (") are proper in the files included also. Mostly this should solve the problem.

Regards,
Ashish

Thanks. As stated, I already checked those.

Re: Nasty Little Syntax Error
tlwtheq - Fri May 06 08:19:47 EDT 2011

Okay..got past this one. DXL has changed a little bit since
I last used it. In this case, I had an "open" statement and,
wanting the module to stay open after execution, I commented
out the "close".

Re: Nasty Little Syntax Error
llandale - Fri May 06 13:28:21 EDT 2011

tlwtheq - Fri May 06 08:19:47 EDT 2011
Okay..got past this one. DXL has changed a little bit since
I last used it. In this case, I had an "open" statement and,
wanting the module to stay open after execution, I commented
out the "close".

That will not trigger an interpret syntax error, unless there was something else on the "close" line. Not "clothes line". I'm guessing you commented it out with a comment block:

/* close(mod)
*/

rather than a comment line:

// close(mod)

and there was another comment block that the new one also ended. DXL doesn't allow nested comment blocks.

/* start of natural comment block
bla bla bla
*/
i = j


The above gets an error "undeclared variable(j)" . So lets just comment out the whole thing but surrounding it with a comment block start and end:

 

/*    Lets comment out the offending J variable
/* start of natural comment block
bla bla bla
*/
int i = j
*/ 
// end commenting out J


Well, you get the same error since the comment block after bla bla bla ends BOTH blocks. Hate it when that happens. This is why I rarely use comment blocks inside my code, in case I want to comment out the whole section later.

 

 

 

  • Louie